import { Shop } from '../shop/shop.entity'
import { PrimaryGeneratedColumn, Entity, OneToMany, Column } from 'typeorm'
@Entity()
export class Company {
  @PrimaryGeneratedColumn()
  id: number

  @Column({
    comment: '公司名'
  })
  name: string

  @Column({
    comment: '公司logo'
  })
  logo: string

  /**
   * 一个会员有多个店铺
   */
  @OneToMany(type => Shop, shop => shop.company)
  shops: Shop[]
}
